X-Git-Url: https://permondes.de/gitweb/Analog_Engine.git/blobdiff_plain/4124db17783ef95a2a0020b4a7624b41c0f1b0e5..92b24062f5676c290b5d041358aaa25b49f2f4f2:/scripts/Superposition%20of%20oscillations.LACE?ds=sidebyside diff --git a/scripts/Superposition of oscillations.LACE b/scripts/Superposition of oscillations.LACE new file mode 100644 index 0000000..b25f7e4 --- /dev/null +++ b/scripts/Superposition of oscillations.LACE @@ -0,0 +1,31 @@ +# Superposition of the oscillation of two undamped harmonic oscillators +# x1'' = -omega1^2*x1 +# x2'' = -omega2^2*x2 + +coefficient.1(-1) -> -x10 # amplitude of 1 +coefficient.2 -> omega1^2 +coefficient.5(-1) -> -x20 # amplitude of 2 +coefficient.6 -> omega2^2 + +# 1st oscillator +iintegrate x1'' -> -x1' +iintegrate -x1' -> x1 + IC: -x10 +cmultiply x1, omega1^2 -> omega1^2*x1 +invert omega1^2*x1 -> -omega1^2*x1 +assign -omega1^2*x1 -> x1'' +output x1 -> out.x + +# 2nd oscillator +iintegrate x2'' -> -x2' +iintegrate -x2' -> x2 + IC: -x20 +cmultiply x2, omega2^2 -> omega2^2*x2 +invert omega2^2*x2 -> -omega2^2*x2 +assign -omega2^2*x2 -> x2'' +output x2 -> out.y + +# Sum +isum x1, x2 -> -(x1+x2) +invert -(x1+x2) -> x1+x2 +output x1+x2 -> out.z